package com.zhzh.sc.demo.leetcode.learn;

import com.zhzh.sc.demo.leetcode.learn.link.MyLinkedList;

/**
 * @author: dasouche
 * @date: 2021-02-24 10:25
 **/
public class LinkedList {

    public static void main(String[] args) {
        designLinkedList();
    }

    public static void designLinkedList() {
        MyLinkedList myLinkedList = new MyLinkedList();
//        myLinkedList.addAtHead(1);
//        myLinkedList.addAtTail(3);
        myLinkedList.addAtIndex(0, 10);
        myLinkedList.addAtIndex(0, 20);
        myLinkedList.addAtIndex(1, 30);
        myLinkedList.display();
        System.out.println(myLinkedList.get(0));
        myLinkedList.deleteAtIndex(1);
        System.out.println(myLinkedList.get(1));
    }

}
